(function(jQuery) {
  window.onload = function() {
    var dom = function(id) {
      return document.getElementById(id);
    }
    var timezone = dom('agency_timezone');
    TimeZone(timezone, tz);
    var language = dom('agency_lang');
    Language(language, lang);

    $('#editorform').validate({
      rules: {
        agency_id: "required",
        agency_name: "required",
        agency_timezone: "required",
        agency_url: {
          required: true,
          url: true
        }
      },
      messages: {
      
    }
    });/*

    function formcheck() {
      return validator.isUrl(dom("agency_url").value) &&
      validator.isName(dom("agency_id").value);
       
    }
     
    $('#editorform').submit(function (){
      return formcheck();
    })*/
  }
})();
